{% extends "base_sub.html" %}

{% block title %}{{ write.wr_subject|truncate(20, False, '...', 0) }} > 废料{% endblock title %}

{% block content %}
    <script>
        if (window.name != 'win_scrap') {
            alert('请以正确的方式使用它.');
            window.close();
        }
    </script>
    <div id="scrap_do" class="new_win">
        <h1 id="win_title">废料</h1>
        <form name="f_scrap_popin" action="{{ url_for('scrap_form_update', bo_table=bo_table, wr_id=write.wr_id) }}" method="post" onsubmit="return fscrappopin_submit(this);">
            <input type="hidden" name="token" value="">
            <div class="new_win_con px-4">
                <h2 class="blind">检查标题并写评论</h2>
                <ul class="p-0">
                    <li class="scrap_tit mb-3 input-bg input-border main-font py-3 px-4 fs-5 fw-bold">
                        <span class="blind">标题</span>
                        {{ write.wr_subject }}
                    </li>
                    <li>
                        <label for="wr_content" class="d-block mb-2 fs-5 sub-font">评论写作</label>
                        <textarea name="wr_content" id="wr_content" class="w-100 h-100 input-bg input-border main-font"></textarea>
                    </li>
                </ul>
            </div>
            <p class="win_desc mx-4">您可以在刮擦时留下感谢或鼓励的评论.</p>
            <div class="win_btn my-3 text-center">
                <button type="submit" class="btn_submit">检查废料</button>
            </div>
        </form>
    </div>
    <script>
        function fscrappopin_submit(f) {
            f.token.value = generate_token();
            return true;
        }
    </script>
{% endblock content %}